home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / xfs_repair.z / xfs_repair
Encoding:
Text File  |  2002-10-03  |  19.8 KB  |  397 lines

  1.  
  2.  
  3.  
  4. xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))                                                  xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      xfs_repair - repair an XFS filesystem
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      xxxxffffssss____rrrreeeeppppaaaaiiiirrrr [ ----nnnn ] [ ----LLLL ] [ ----oooo subopt[=value] ] xfs_special
  13.  
  14.      xxxxffffssss____rrrreeeeppppaaaaiiiirrrr ----ffff [ ----nnnn ] [ ----LLLL ] [ ----oooo subopt[=value] ] ... file
  15.  
  16.      xxxxffffssss____rrrreeeeppppaaaaiiiirrrr66664444 [ ----nnnn ] [ ----LLLL ] [ ----oooo subopt[=value] ] xfs_special
  17.  
  18.      xxxxffffssss____rrrreeeeppppaaaaiiiirrrr66664444 ----ffff [ ----nnnn ] [ ----LLLL ] [ ----oooo subopt[=value] ] ... file
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      _x_f_s__r_e_p_a_i_r repairs corrupt or damaged XFS filesystems (see _x_f_s(4)).
  22.      _x_f_s__r_e_p_a_i_r does not work on EFS filesystems (see _f_s_c_k(1M)).  The
  23.      filesystem is specified using the _x_f_s__s_p_e_c_i_a_l argument which should be
  24.      the device name of the disk partition or volume containing the
  25.      filesystem.  If given the name of a block device, _x_f_s__r_e_p_a_i_r will attempt
  26.      to find the raw device associated with the specified block device and
  27.      will use the raw device instead.
  28.  
  29.      Regardless, the filesystem to be repaired must be unmounted, otherwise,
  30.      the resulting filesystem may be inconsistent or corrupt.
  31.  
  32.      xfs_repair is an n32 binary and will run on all Irix platforms.  However,
  33.      when repairing a multi-terabyte filesystem, the memory requirements
  34.      exceed what is available to n32 binaries.  For those filesystems,
  35.      xfs_repair64, 64-bit binary, should be used.
  36.  
  37.      The options to _x_f_s__r_e_p_a_i_r are:
  38.  
  39.      ----ffff   Specifies that the special device is actually a file (see the
  40.           _m_k_f_s__x_f_s ----dddd _f_i_l_e option).  This might happen if an image copy of a
  41.           filesystem has been copied or written into an ordinary file.
  42.  
  43.      ----LLLL   Force Log Zeroing.  Forces _x_f_s__r_e_p_a_i_r to zero the log even if there
  44.           is metadata in it.  When using this option the filesystem will
  45.           likely appear to be corrupt, and can cause the loss of user files
  46.           and/or data.
  47.  
  48.      ----nnnn   No modify mode.  Specifies that _x_f_s__r_e_p_a_i_r should not modify the
  49.           filesystem but should only scan the filesystem and indicate what
  50.           repairs would have been made.
  51.  
  52.      ----oooo   Override what the program might conclude about the filesystem if
  53.           left to its own devices.
  54.  
  55.           The aaaassssssssuuuummmmeeee____xxxxffffssss suboption specifies that the filesystem is an XFS
  56.           filesystem.  Normally, if _x_f_s__r_e_p_a_i_r cannot find an XFS superblock,
  57.           it checks to see if the filesystem is an EFS filesystem before it
  58.           tries to regenerate the XFS superblock.  If the aaaassssssssuuuummmmeeee____xxxxffffssss option is
  59.           in effect, _x_f_s__r_e_p_a_i_r will assume that the filesystem is an XFS
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))                                                  xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))
  71.  
  72.  
  73.  
  74.           filesystem and will ignore an EFS superblock if one is found.
  75.  
  76.    CCCChhhheeeecccckkkkssss PPPPeeeerrrrffffoooorrrrmmmmeeeedddd
  77.      Inconsistencies corrected include the following:
  78.  
  79.      1.   Inode and inode blockmap (addressing) checks:  bad magic number in
  80.           inode, bad magic numbers in inode blockmap blocks, extents out of
  81.           order, incorrect number of records in inode blockmap blocks, blocks
  82.           claimed that are not in a legal data area of the filesystem, blocks
  83.           that are claimed by more than one inode.
  84.  
  85.      2.   Inode allocation map checks:  bad magic number in inode map blocks,
  86.           inode state as indicated by map (free or in-use) inconsistent with
  87.           state indicated by the inode, inodes referenced by the filesystem
  88.           that do not appear in the inode allocation map, inode allocation map
  89.           referencing blocks that do not appear to contain inodes.
  90.  
  91.      3.   Size checks:  number of blocks claimed by inode inconsistent with
  92.           inode size, directory size not block aligned, inode size not
  93.           consistent with inode format.
  94.  
  95.      4.   Directory checks:  bad magic numbers in directory blocks, incorrect
  96.           number of entries in a directory block, bad freespace information in
  97.           a directory leaf block, entry pointing to an unallocated (free) or
  98.           out of range inode, overlapping entries, missing or incorrect dot
  99.           and dotdot entries, entries out of hashvalue order, incorrect
  100.           internal directory pointers, directory type not consistent with
  101.           inode format and size.
  102.  
  103.      5.   Pathname checks:  files or directories not referenced by a pathname
  104.           starting from the filesystem root, illegal pathname components.
  105.  
  106.      6.   Link count checks:  link counts that do not agree with the number of
  107.           directory references to the inode.
  108.  
  109.      7.   Freemap checks:  blocks claimed free by the freemap but also claimed
  110.           by an inode, blocks unclaimed by any inode but not appearing in the
  111.           freemap.
  112.  
  113.      8.   Super Block checks:  total free block and/or free i-node count
  114.           incorrect, filesystem geometry inconsistent, secondary and primary
  115.           superblocks contradictory.
  116.  
  117.      Orphaned files and directories (allocated, in-use but unreferenced) are
  118.      reconnected by placing them in the _l_o_s_t+_f_o_u_n_d directory.  The name
  119.      assigned is the inode number.
  120.  
  121.    DDDDiiiisssskkkk EEEErrrrrrrroooorrrrssss
  122.      _x_f_s__r_e_p_a_i_r aborts on most disk I/O errors.  Therefore, if you are trying
  123.      to repair a filesystem that was damaged due to a disk drive failure,
  124.      steps should be taken to ensure that all blocks in the filesystem are
  125.      readable and writeable before attempting to use _x_f_s__r_e_p_a_i_r to repair the
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))                                                  xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      filesystem.  Possible methods include using _d_d(1M) to copy the data onto
  141.      a good disk or _f_x(1M) to remap bad blocks if the block numbers are known.
  142.      _f_x(1M), if used, should be used with extreme caution.
  143.  
  144.    lllloooosssstttt++++ffffoooouuuunnnndddd
  145.      The directory _l_o_s_t+_f_o_u_n_d does not have to already exist in the filesystem
  146.      being repaired.  If the directory does not exist, it is automatically
  147.      created.  If the _l_o_s_t+_f_o_u_n_d directory already exists, the _l_o_s_t+_f_o_u_n_d
  148.      directory is deleted and recreated every time _x_f_s__r_e_p_a_i_r runs.  This
  149.      ensures that there are no name conflicts in _l_o_s_t+_f_o_u_n_d.  However, if you
  150.      rename a file in _l_o_s_t+_f_o_u_n_d and leave it there, if _x_f_s__r_e_p_a_i_r is run
  151.      again, that file is renamed back to its inode number.
  152.  
  153.    CCCCoooorrrrrrrruuuupppptttteeeedddd SSSSuuuuppppeeeerrrrbbbblllloooocccckkkkssss
  154.      XFS has both primary and secondary superblocks.  _x_f_s__r_e_p_a_i_r uses
  155.      information in the primary superblock to automatically find and validate
  156.      the primary superblock against the secondary superblocks before
  157.      proceeding.  Should the primary be too corrupted to be useful in locating
  158.      the secondary superblocks, the program scans the filesystem until it
  159.      finds and validates some secondary superblocks.  At that point, it
  160.      generates a primary superblock.
  161.  
  162.    QQQQuuuuoooottttaaaassss
  163.      If quotas are in use, it is possible that _x_f_s__r_e_p_a_i_r will clear some or
  164.      all of the filesystem quota information.  If so, the program issues a
  165.      warning just before it terminates.  If all quota information is lost,
  166.      quotas are disabled and the program issues a warning to that effect.
  167.  
  168.      Note that _x_f_s__r_e_p_a_i_r does not check the validity of quota limits.  It is
  169.      recommended that you check the quota limit information manually after
  170.      _x_f_s__r_e_p_a_i_r.  Also, space usage information is automatically regenerated
  171.      the next time the filesystem is mounted with quotas turned on, so the
  172.      next quota mount of the filesystem may take some time.
  173.  
  174. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  175.      _x_f_s__r_e_p_a_i_r issues informative messages as it proceeds indicating what it
  176.      has found that is abnormal or any corrective action that it has taken.
  177.      Most of the messages are completely understandable only to those who are
  178.      knowledgeable about the structure of the filesystem.  Some of the more
  179.      common messages are explained here.  Note that the language of the
  180.      messages is slightly different if _x_f_s__r_e_p_a_i_r is run in no-modify mode
  181.      because the program is not changing anything on disk.  No-modify mode
  182.      indicates what it would do to repair the filesystem if run without the
  183.      no-modify flag.
  184.  
  185.      disconnected inode xxxxxxxxxxxxxxxx, moving to _l_o_s_t+_f_o_u_n_d
  186.  
  187.           An inode numbered xxxxxxxxxxxxxxxx was not connected to the filesystem directory
  188.           tree and was reconnected to the _l_o_s_t+_f_o_u_n_d directory.  The inode is
  189.           assigned the name of its inode number (i-number).  If a _l_o_s_t+_f_o_u_n_d
  190.           directory does not exist, it is automatically created.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))                                                  xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      disconnected dir inode xxxxxxxxxxxxxxxx, moving to _l_o_s_t+_f_o_u_n_d
  207.  
  208.           As above only the inode is a directory inode.  If a directory inode
  209.           is attached to _l_o_s_t+_f_o_u_n_d, all of its children (if any) stay
  210.           attached to the directory and therefore get automatically
  211.           reconnected when the directory is reconnected.
  212.  
  213.      imap claims in-use inode xxxxxxxxxxxxxxxx is free, correcting imap
  214.  
  215.           The inode allocation map thinks that inode xxxxxxxxxxxxxxxx is free whereas
  216.           examination of the inode indicates that the inode may be in use
  217.           (although it may be disconnected).  The program updates the inode
  218.           allocation map.
  219.  
  220.      imap claims free inode xxxxxxxxxxxxxxxx is in use, correcting imap
  221.  
  222.           The inode allocation map thinks that inode xxxxxxxxxxxxxxxx is in use whereas
  223.           examination of the inode indicates that the inode is not in use and
  224.           therefore is free.  The program updates the inode allocation map.
  225.  
  226.      resetting inode xxxxxxxxxxxxxxxx nlinks from xxxx to yyyy
  227.  
  228.           The program detected a mismatch between the number of valid
  229.           directory entries referencing inode xxxxxxxxxxxxxxxx and the number of
  230.           references recorded in the inode and corrected the the number in the
  231.           inode.
  232.  
  233.      ffffoooorrrrkkkk----ttttyyyyppppeeee fork in ino xxxxxxxxxxxxxxxx claims used block yyyyyyyyyyyyyyyy
  234.  
  235.           Inode xxxxxxxxxxxxxxxx claims a block yyyyyyyyyyyyyyyy that is used (claimed) by either
  236.           another inode or the filesystem itself for metadata storage.  The
  237.           ffffoooorrrrkkkk----ttttyyyyppppeeee is either ddddaaaattttaaaa or aaaattttttttrrrr indicating whether the problem lies
  238.           in the portion of the inode that tracks regular data or the portion
  239.           of the inode that stores XFS attributes.  If the inode is a real-
  240.           time (rt) inode, the message says so.  Any inode that claims blocks
  241.           used by the filesystem is deleted.  If two or more inodes claim the
  242.           same block, they are both deleted.
  243.  
  244.      ffffoooorrrrkkkk----ttttyyyyppppeeee fork in ino xxxxxxxxxxxxxxxx claims dup extent ...
  245.  
  246.           Inode xxxxxxxxxxxxxxxx claims a block in an extent known to be claimed more than
  247.           once.  The offset in the inode, start and length of the extent is
  248.           given.  The message is slightly different if the inode is a real-
  249.           time (rt) inode and the extent is therefore a real-time (rt) extent.
  250.  
  251.      inode xxxxxxxxxxxxxxxx - bad extent ...
  252.  
  253.           An extent record in the blockmap of inode xxxxxxxxxxxxxxxx claims blocks that
  254.           are out of the legal range of the filesystem.  The message supplies
  255.           the start, end, and file offset of the extent.  The message is
  256.           slightly different if the extent is a real-time (rt) exent.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))                                                  xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      bad ffffoooorrrrkkkk----ttttyyyyppppeeee fork in inode xxxxxxxxxxxxxxxx
  273.  
  274.           There was something structurally wrong or inconsistent with the data
  275.           structures that map offsets to filesystem blocks.
  276.  
  277.      cleared inode xxxxxxxxxxxxxxxx
  278.  
  279.           There was something wrong with the inode that was uncorrectable so
  280.           the program freed the inode.  This usually happens because the inode
  281.           claims blocks that are used by something else or the inode itself is
  282.           badly corrupted.  Typically, this message is preceded by one or more
  283.           messages indicating why the inode needed to be cleared.
  284.  
  285.      bad attribute fork in inode xxxxxxxxxxxxxxxx, clearing attr fork
  286.  
  287.           There was something wrong with the portion of the inode that stores
  288.           XFS attributes (the attribute fork) so the program reset the
  289.           attribute fork.  As a result of this, all attributes on that inode
  290.           are lost.
  291.  
  292.      correcting nextents for inode xxxxxxxxxxxxxxxx, was xxxx - counted yyyy
  293.  
  294.           The program found that the number of extents used to store the data
  295.           in the inode is wrong and corrected the number.  The message refers
  296.           to nextents if the count is wrong on the number of extents used to
  297.           store attribute information.
  298.  
  299.      entry """"nnnnaaaammmmeeee"""" in dir xxxxxxxxxxxxxxxx not consistent with ..  value (yyyyyyyyyyyyyyyy) in dir ino
  300.      xxxxxxxxxxxxxxxx, junking entry """"nnnnaaaammmmeeee"""" in directory inode xxxxxxxxxxxxxxxx
  301.  
  302.           The entry """"nnnnaaaammmmeeee"""" in directory inode xxxxxxxxxxxxxxxx references a directory
  303.           inode yyyyyyyyyyyyyyyy.  However, the .. entry in directory yyyyyyyyyyyyyyyy does not point
  304.           back to directory xxxxxxxxxxxxxxxx, so the program deletes the entry """"nnnnaaaammmmeeee"""" in
  305.           directory inode xxxxxxxxxxxxxxxx.  If the directory inode yyyyyyyyyyyyyyyy winds up becoming
  306.           a disconnected inode as a result of this, it is moved to _l_o_s_t+_f_o_u_n_d
  307.           later.
  308.  
  309.      entry """"nnnnaaaammmmeeee"""" in dir xxxxxxxxxxxxxxxx references already connected dir ino yyyyyyyyyyyyyyyy,
  310.      junking entry """"nnnnaaaammmmeeee"""" in directory inode xxxxxxxxxxxxxxxx
  311.  
  312.           The entry """"nnnnaaaammmmeeee"""" in directory inode xxxxxxxxxxxxxxxx points to a directory inode
  313.           yyyyyyyyyyyyyyyy that is known to be a child of another directory.  Therefore,
  314.           the entry is invalid and is deleted.  This message refers to an
  315.           entry in a small directory.  If this were a large directory, the
  316.           last phrase would read "will clear entry".
  317.  
  318.      entry references free inode xxxxxxxxxxxxxxxx in directory yyyyyyyyyyyyyyyy, will clear entry
  319.  
  320.           An entry in directory inode yyyyyyyyyyyyyyyy references an inode xxxxxxxxxxxxxxxx that is
  321.           known to be free.  The entry is therefore invalid and is deleted.
  322.           This message refers to a large directory.  If the directory were
  323.           small, the message would read "junking entry ...".
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))                                                  xxxxffffssss____rrrreeeeppppaaaaiiiirrrr((((1111MMMM))))
  335.  
  336.  
  337.  
  338. EEEEXXXXIIIITTTT SSSSTTTTAAAATTTTUUUUSSSS
  339.      _x_f_s__r_e_p_a_i_r -_n (no modify node) will return a status of 1 if filesystem
  340.      corruption was detected and 0 if no filesystem corruption was detected.
  341.      _x_f_s__r_e_p_a_i_r run without the -n option will always return a status code of
  342.      0.
  343.  
  344. BBBBUUUUGGGGSSSS
  345.      The filesystem to be checked and repaired must have been unmounted
  346.      cleanly using normal system administration procedures (the umount command
  347.      or system shutdown), not as a result of a crash or system reset.  If the
  348.      filesystem has not been unmounted cleanly, mount it and unmount it
  349.      cleanly before running _x_f_s__r_e_p_a_i_r.
  350.  
  351.      _x_f_s__r_e_p_a_i_r does not do a thorough job on XFS extended attributes.  The
  352.      structure of the attribute fork will be consistent, but only the contents
  353.      of attribute forks that will fit into an inode are checked.  This
  354.      limitation will be fixed in the future.
  355.  
  356.      The no-modify mode (----nnnn option) is not completely accurate.  It does not
  357.      catch inconsistencies in the freespace and inode maps, particularly lost
  358.      blocks or subtly corrupted maps (trees).
  359.  
  360.      The no-modify mode can generate repeated warnings about the same problems
  361.      because it cannot fix the problems as they are encountered.
  362.  
  363. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  364.      dd(1M), fx(1M), mkfs_xfs(1M), xfs_check(1M), xfs(4), xlv(7M).
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.